<div ng-controller="importDataCtrl">
  <header style="float:right">
    <a ng-click="importData()" class="btn btn-info add-button">
      <i class="glyphicon glyphicon-plus"></i>批量导入数据
    </a>
  </header>
  <div class="col-lg-6 col-sm-6 col-xs-12">
      <div class="widget flat radius-bordered">
          <div class="widget-header bg-blue">
              <span class="widget-caption">发票信息</span>
          </div>
          <div class="widget-body">
              <div id="registration-form">
                  <form id="formrecord" role="form" ng-submit="addRecord()">
                      <div class="form-title">
                          基本信息
                      </div>
                      <div class="form-group">
                          <span class="input-icon icon-right">
                              <input type="text" name="commodityName" class="form-control" placeholder="商品名称" required>
                          </span>
                      </div>
                      <div class="form-group">
                          <select required class="form-control" name="largeClassId" ng-model="selectLargeClass" >
                            <option value='' disabled selected style='display:none;'>请选择商品大类别</option>
                            <option value="{{x.largeClassId}}" ng-repeat="x in largeClass">{{x.largeClassName}}</option>
                          </select>
                      </div>
                      <div class="form-group">
                        <select required class="form-control" name="smallClassId" ng-model="selectSmallClass" >
                          <option value='' disabled selected style='display:none;'>请选择商品小类别</option>
                          <option value="{{x.smallClassId}}" ng-repeat="x in smallClass">{{x.smallClassName}}</option>
                        </select>
                      </div>
                      <div class="form-group">
                          <span class="input-icon icon-right">
                              <input required type="text" name="unit" class="form-control" id="confirmPasswordInput" placeholder="单位">
                          </span>
                      </div>
                      <div class="form-title">
                          详细信息
                      </div>
                      <div class="row">
                          <div class="col-sm-6">
                              <div class="form-group">
                                  <span class="input-icon icon-right">
                                      <input required type="number" name="smallClassMoney" step="0.01" class="form-control" placeholder="价格">
                                  </span>
                              </div>
                          </div>
                          <div class="col-sm-6">
                              <div class="form-group">
                                  <span class="input-icon icon-right">
                                      <input required type="number" name="commodityAmount" class="form-control" placeholder="数量">
                                  </span>
                              </div>
                          </div>
                      </div>
                      <div class="row">
                          <div class="col-sm-6">
                              <div class="form-group">
                                  <span class="input-icon icon-right">
                                      <input required type="number" name="vatMoney" step="0.01"  class="form-control" placeholder="增值税税额">
                                  </span>
                              </div>
                          </div>
                          <div class="col-sm-6">
                              <div class="form-group">
                                  <select required class="form-control" name="commodityType">
                                    <option value='' disabled selected style='display:none;'>请选择记录类型</option>
                                    <option value="0">进项</option>
                                    <option value="1">销项</option>
                                  </select>
                              </div>
                          </div>
                      </div>
                      <hr class="wide" />
                      <div class="form-group">
                        <select required class="form-control" name="companyId" ng-model="selectCompany" >
                          <option value='' disabled selected style='display:none;'>请选择所属公司</option>
                          <option value="{{x.companyId}}" ng-repeat="x in companys">{{x.companyName}}</option>
                        </select>
                      </div>
                      <button ng-disabled="addRecordBtn" type="submit" class="btn btn-blue">确认录入</button>
                      <button style="float:right" type="reset" id="resBtn" class="btn btn-danger">&nbsp;重&nbsp;置&nbsp;</button>
                  </form>
              </div>
          </div>
      </div>
  </div>
  <!-- //批量导入数据 -->
  <div id="importModel" ng-if="importModel" class="col-lg-4 col-sm-4 col-xs-12">
      <div class="widget">
          <div class="widget-header">
              <span class="widget-caption">通过 Excel表格 批量导入数据</span>
              <span class="icon-right closeImport" ng-click="importData()">
                <i class="glyphicon glyphicon-remove"></i>
              </span>
          </div>
          <div class="widget-body bordered-top bordered-palegreen">
              <div class="collapse in">
                  <form role="form" id="excleform" method="post" ng-submit="sureImport()">
                      <div style="margin-top:12px" class="form-group">
                          <span class="input-icon inverted">
                              <input required style="height:38px" type="file" class="form-control" accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" name="excle">
                              <i style="line-height:38px" class="glyphicon glyphicon-search bg-green"></i>
                          </span>
                      </div>
                      <div style="text-align:right" class="form-group">
                          <button  ng-disabled="importBtn" class="btn btn-success">确认上传</button>
                      </div>
                  </form>
              </div>
          </div>
      </div>
  </div>
  <div class="mask" ng-if="importModel"></div>
</div>
